import re

from sam.util.strUtil import address_only_pcd_re


class AreaUtil(object):
    def __init__(self):
        self.split_pcd_re = re.compile(address_only_pcd_re)

    def split_pcd_from_area(self, area: str) -> list:
        split = re.split(self.split_pcd_re, area)
        count = split.count("")
        for i in range(0, count):
            split.remove("")
        return split
